
<div class="x-body">
    <div class="layui-row">
        <form class="layui-form layui-col-md12 x-so search-form">
            <input class="layui-input"  autocomplete="off" placeholder="开始日" name="date1"  value="{:input('date1')}" id="start">
            <input class="layui-input"  autocomplete="off" placeholder="截止日" name="date2"  value="{:input('date2')}" id="end">
            <input type="text" name="search_data"  placeholder="用户名|手机号" autocomplete="off" value="{:input('search_data')}"  class="layui-input">

            <div class="layui-input-inline">
                <select name="status">
                    <option value="" >全部</option>
                    <option value="0" {notempty name="param['status']"}{if condition="$param['status'] eq 0"} selected="selected" {/if}{/notempty} >未付款</option>
                    <option value="1" {notempty name="param['status']"}{if condition="$param['status'] eq 1"} selected="selected" {/if}{/notempty}> 已付款</option>
                    <option value="2" {notempty name="param['status']"}{if condition="$param['status'] eq 2"} selected="selected" {/if}{/notempty}> 已发货</option>
                    <option value="-1" {notempty name="param['status']"}{if condition="$param['status'] eq -1"} selected="selected" {/if}{/notempty}> 已取消</option>
                </select>
            </div>
            <button class="layui-btn"  id="search"  url="{:url('applicationOrder')}"  lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>
        </form>
    </div>
    <xblock>
        <!--<button class="layui-btn layui-btn-danger" onclick="delAll()"><i class="layui-icon"></i>批量删除</button>-->


    </xblock>
    <table class="layui-table x-admin">
        <thead>
        <tr>

            <th>序号</th>

            <th>会员账户</th>
            <th>订单类型</th>
            <th>订单金额</th>
            <th>信息</th>
            <th>订单提交时间</th>
            <th>订单状态</th>
            <th>备注</th>
            <th>操作</th>
        </thead>
        {notempty name='list'}
        <tbody>
        {volist name='list' id='vo' key="k"}
        <tr>

            <td>{$k}</td>
            <td>
                <div><span>{$vo.username}</span></div>


            </td>
            <td>
                {if condition = "$vo.type eq 1"}
                <div><span>酒店</span></div>
                {else}
                    {if condition = "$vo.type eq 2"}
                    <div><span>火车票</span></div>
                    {else}
                        {if condition = "$vo.type eq 3"}
                        <div><span>飞机票</span></div>
                        {/if}
                    {/if}
                {/if}


            </td>
            <td>
                {if condition = "$vo.type eq 1"}
                <div><span>{$vo.order_amount}</span></div>
                {else}
                    {if condition = "$vo.type eq 2"}
                    <div><span>{$vo.order_amount}</span></div>
                    {else}
                        {if condition = "$vo.type eq 3"}
                        <div><span>{$vo.amount}</span></div>
                        {/if}
                    {/if}
                {/if}
            </td>

            <td>
                {if condition = "$vo.type eq 1"}
                <div><span>订单号：{$vo.order_no}</span></div>
                <div><span>酒店id：{$vo.h_id}</span></div>
                <div><span>房型id：{$vo.room_id}</span></div>
                <div><span>入住日期：{$vo.in_date}</span></div>
                <div><span>离店日期：{$vo.out_date}</span></div>
                <div><span>最晚到店时间：{$vo.latest_time}</span></div>
                <div><span>房间数量：{$vo.rooms_count}</span></div>
                <div><span>入住人：{$vo.passengers}</span></div>
                <div><span>联系人姓名：{$vo.contact_name}</span></div>
                <div><span>联系人手机号：{$vo.contact_mobile}</span></div>
                {else}
                    {if condition = "$vo.type eq 2"}
                    <div><span>订单号：{$vo.order_no}</span></div>
                    <div><span>出发站：{$vo.start_city}</span></div>
                    <div><span>到达站：{$vo.end_city}</span></div>
                    <div><span>出发日期：{$vo.start_date}</span></div>
                    <div><span>车次：{$vo.train_no}</span></div>
                    <div><span>出发时间：{$vo.start_time}</span></div>
                    <div><span>到达时间：{$vo.end_time}</span></div>
                    <div><span>联系人姓名：{$vo.contact_name}</span></div>
                    <div><span>联系人手机号：{$vo.contact_phone}</span></div>
                    <div><span>乘客姓名：{$vo.psg_name}</span></div>
                    <div><span>票类型：{if condition = "$vo.ticket_type eq 0"}成人票{else}儿童票{/if}</span></div>
                    <div><span>座位类型：{switch name="vo.seat_type"}
                        {case value="0"}商务座{/case}
                        {case value="1"}特等座{/case}
                        {case value="2"}一等座{/case}
                        {case value="3"}二等座{/case}
                        {case value="4"}高级软卧{/case}
                        {case value="5"}软卧{/case}
                        {case value="6"}硬卧{/case}
                        {case value="7"}软座{/case}
                        {case value="8"}硬座{/case}
                        {case value="9"}无座{/case}
                        {case value="10"}其他{/case}
                        {default /}default
                    {/switch}</span></div>
                    <div><span>证件类型：{switch name="vo.card_type"}
                        {case value="0"}身份证{/case}
                        {case value="1"}护照{/case}
                        {case value="2"}港澳通行证{/case}
                        {case value="2"}台湾通行证{/case}
                        {default /}default
                    {/switch}</span></div>
                    <div><span>证件号：{$vo.card_no}</span></div>
                    <div><span>手机号：{$vo.phone}</span></div>
                    {else}
                        {if condition = "$vo.type eq 3"}
                        <div><span>订单号：{$vo.order_no}</span></div>
                        <div><span>航班类型：{switch name="vo.flight_type"}
                        {case value="0"}单程{/case}
                        {case value="1"}往返{/case}
                        {case value="2"}联程{/case}
                        {default /}default
                        {/switch}</span></div>
                        <div><span>联系人姓名：{$vo.contact_name}</span></div>
                        <div><span>联系人手机号：{$vo.contact_mobile}</span></div>
                        <div><span>订单备注：{$vo.order_remark}</span></div>
                        <div><span>航班号：{$vo.flight_no}</span></div>
                        <div><span>舱位：{$vo.cabin}</span></div>
                        <div><span>出发机场三字码：{$vo.s_airport_code}</span></div>
                        <div><span>到达机场三字码：{$vo.e_airport_code}</span></div>
                        <div><span>出发航站楼：{$vo.s_terminal}</span></div>
                        <div><span>到达航站楼：{$vo.e_terminal}</span></div>
                        <div><span>出发时间：{$vo.from_date_time}</span></div>
                        <div><span>到达时间：{$vo.arrive_date_time}</span></div>
                        <div><span>机型：{$vo.plane_type}</span></div>
                        <div><span>票面价：{$vo.fare}</span></div>
                        <div><span>燃油费：{$vo.oil}</span></div>
                        <div><span>机建费：{$vo.tax}</span></div>
                        <div><span>折扣：{$vo.discount}</span></div>
                        <div><span>乘客类型：{switch name="vo.psg_type"}
                        {case value="1"}成人{/case}
                        {case value="2"}儿童{/case}
                        {case value="3"}婴儿{/case}
                        {default /}default
                        {/switch}</span></div>
                        <div><span>乘机人姓名：{$vo.psg_name}</span></div>
                        <div><span>证件号：{$vo.card_no}</span></div>
                        <div><span>手机号码：{$vo.mobile}</span></div>
                        <div><span>生日：{$vo.birth_day}</span></div>
                        <div><span>下单参数：{$vo.book_data}</span></div>
                        {else}
                            {if condition = "$vo.type eq 4"}
                            <div><span>手机号：{$vo.mobile}</span></div>
                            <div><span>金额：{$vo.price}</span></div>
                            {else}
                                {if condition = "$vo.type eq 5"}
                                <div><span>金额：{$vo.price}</span></div>
                                <div><span>产品id：{$vo.proid}</span></div>
                                <div><span>充值数量：{$vo.card_num}</span></div>
                                <div><span>加油卡卡号：{$vo.game_userid}</span></div>
                                <div><span>持卡人手机号：{$vo.gas_cardtel}</span></div>
                                <div><span>持卡人姓名：{$vo.gas_cardname}</span></div>
                                <div><span>加油卡类型：{$vo.charge_type}</span></div>
                                {else}
                                    {if condition = "$vo.type eq 6"}
                                    <div><span>乘客姓名：{$vo.true_name}</span></div>
                                    <div><span>出发地：{$vo.start_name}</span></div>
                                    <div><span>出发地：{$vo.start_name}</span></div>
                                    <div><span>目的地：{$vo.end_name}</span></div>
                                    <div><span>金额：{$vo.price}</span></div>
                                    <div><span>司机姓名：{$vo.driver_name}</span></div>
                                    <div><span>车牌号：{$vo.driver_license}</span></div>
                                    {/if}
                                {/if}
                            {/if}
                        {/if}
                    {/if}
                {/if}
            </td>





            <td>
                <div><span>{$vo.create_time|date="Y-m-d H:i:s",###}</span></div>
            </td>

            <td>
                <div><span>
                    {switch name="vo.status"}
                        {case value="1"}待付款{/case}
                        {case value="2"}已付款{/case}
                        {case value="3"}已发货{/case}
                        {case value="-1"}已取消{/case}
                        {default /}default
                    {/switch}
                </span></div>


            </td>

            <td>
                {volist name='vo.fail_remark' id='voa'}
                <div><span>提交时间：{$voa.create_time|date="Y-m-d H:i:s",###}</span></div>
                <div><span>提交失败原因：{$voa.result_msg}</span></div>
                {/volist}


            </td>
            <td class="td-manage">
                <!--<a onclick="member_stop(this,'10001')" href="javascript:;"  title="启用">-->
                <!--<i class="layui-icon">&#xe601;</i>-->
                <!--</a>-->
                {if condition="$vo.status eq 2"}
                <div style="margin-bottom: 5px;"><label></label><span>   <a title="发货" style="color: #0a8cd2"   href="{:url('order_confirm', array('id' => $vo['id'],'type'=>$vo['type']))}" >
                    发货
                </a></span></div>

                {/if}


                {if condition="$vo.status eq 1 ||  $vo.status eq 2"}
                <div style="margin-bottom: 5px;"><label></label><span>   <a  title="取消订单"   style="color: #0a8cd2" href="javascript:reply({$vo.id},-1);">  取消</a></span></div>
                {/if}
            </td>
        </tr>
        {/volist}
        {else/}
        <tbody><tr class="odd"><td colspan="12" class="text-center" valign="top">{:config('empty_list_describe')}</td></tr></tbody>
        {/notempty}

        </tbody>
    </table>

    <div class="page">
        {notempty name='list.list'}   {$list->render()}{/notempty}
    </div>
</div>
<script>
    layui.use('form', function(){
        form = layui.form;

    });
    layui.use('laydate', function(){
        var laydate = layui.laydate;

        //执行一个laydate实例
        laydate.render({
            elem: '#start' //指定元素
        });

        //执行一个laydate实例
        laydate.render({
            elem: '#end' //指定元素
        });
    });

    function reply(id,state) {
        if(state==2){
            var title='发货'


        }else{
            var title='取消订单'
        }
        layer.open({
            type: 2 //此处以iframe举例
            ,title: title
            ,area: ['50%', '70%']
            ,shade: 0
            ,maxmin: true
            ,content: "applicationOrderConfirm?id="+id+'&status='+state+'&otcorder=1'
            ,btn: [] //只是为了演示
        });

    }
</script>

</body>

</html>


